package com.ztools.common.model.pc.store;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ztools.common.model.pc.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author: seeTools
 * @Date: 2023/5/20  16:57
 * @Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("store_online_stock")
public class OnlineStock extends BaseModel {


    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商品ID
     */
    @TableField("commodity_id")
    private Long commodityId;

    /**
     * 商品名称
     */
    @TableField(exist = false)
    private String commodityName;

    /**
     * 分区名称
     */
    @TableField("tab_name")
    private Integer tabName;

    /**
     * 分区名称
     */
    @TableField(exist = false)
    private String tabShowName;

    /**
     * 上架时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField("start_date")
    private Date startDate;

    /**
     * 下架时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField("end_date")
    private Date endDate;

    /**
     * 是否可以积分兑换
     */
    @TableField("point_exchange")
    private Integer pointExchange;

    /**
     * 是否可以积分加钱兑换
     */
    @TableField("point_plus_exchange")
    private Integer pointPlusExchange;

    /**
     * 积分数量
     */
    @TableField("point_cost")
    private Integer pointCost;

    /**
     * 上线数量
     */
    @TableField("online_number")
    private Integer onlineNumber;

    /**
     * 销售价
     */
    @JSONField(format = "#0.00")
    @TableField("sale_price")
    private BigDecimal salePrice;

    /**
     * 图片地址
     */
    @TableField(exist = false)
    private String picUrls;

    /**
     * 商品分类
     */
    @TableField(exist = false)
    private String typeName;

    /**
     * 加购金额
     */
    @JSONField(format = "#0.00")
    private BigDecimal plusMoneyCost;
}
